package com.sunny.shop.api.v1;

import com.sunny.shop.core.interceptors.ScopeLevel;
import com.sunny.shop.dto.CollectDTO;
import com.sunny.shop.exception.httpe.Success;
import com.sunny.shop.service.CollectServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/collect")
public class CollectController {
    @Autowired
    private CollectServiceImpl collectService;

    @ScopeLevel
    @PostMapping("")
    public void collectTopic(@RequestBody CollectDTO collectDTO){
        collectService.collectTopic(collectDTO);
        throw new Success(90001);
    }
}
